﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RoomInfo.aspx.cs" Inherits="Fitment.Budget.RoomInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            AutoGenerateEditButton="True" DataKeyNames="Room_ID" 
            DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="Room_ID" HeaderText="Room_ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="Room_ID" />
                <asp:BoundField DataField="House_ID" HeaderText="House_ID" 
                    SortExpression="House_ID" />
                <asp:BoundField DataField="RoomType" HeaderText="RoomType" 
                    SortExpression="RoomType" />
                <asp:BoundField DataField="RoomLength" HeaderText="RoomLength" 
                    SortExpression="RoomLength" />
                <asp:BoundField DataField="RoomWidth" HeaderText="RoomWidth" 
                    SortExpression="RoomWidth" />
                <asp:BoundField DataField="RoomHeight" HeaderText="RoomHeight" 
                    SortExpression="RoomHeight" />
            </Columns>
        </asp:GridView>
        <br />
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="下一步" />
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:FitmentConnectionString %>" 
            SelectCommand="SELECT * FROM [RoomInfo]" 
            UpdateCommand="UPDATE RoomInfo SET RoomLength = @RoomLength, RoomWidth = @RoomWidth, RoomHeight = @RoomHeight WHERE (Room_ID = @Room_ID)">
            <UpdateParameters>
                <asp:Parameter Name="RoomLength" />
                <asp:Parameter Name="RoomWidth" />
                <asp:Parameter Name="RoomHeight" />
            </UpdateParameters>
        </asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
